home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / clkt300s.zip / CLKTIMER.DOC < prev   
Text File  |  1992-12-02  |  21KB  |  417 lines

  1.      CLKTIMER - Clock and task performing TSR (v2.10s)
  2.                 Copyright 1992 by Roger Brook
  3.  
  4.      MEMORY REQUIREMENT: less than 5K bytes
  5.  
  6.      INTERRUPT VECTORS ATTACHED: 09h, 1Ch, 21h, 22h, 66h
  7.  
  8.      PURPOSE: A TSR to perform tasks at designated times.  Tasks that can
  9.               be performed include displaying the current time (and
  10.               optionally date) in the upper right hand corner of the
  11.               screen, sounding and displaying an alarm in the upper left
  12.               hand corner of the screen, booting the computer, and
  13.               forcing keystrokes into the keystroke buffer to start or
  14.               terminate a DOS program.
  15.  
  16.               Keystroke tasks (a sequence of keystrokes) can be performed
  17.               at a set time, each hour at a specified number of minutes
  18.               after the hour, or after the computer has been idle for a
  19.               specified number of seconds.
  20.  
  21.               CLKTIMER is intended to used in a batch file to set up a
  22.               sequence of tasks to be performed on an unattended basis.
  23.               CLKTIMER can be run anytime, with new tasks added to the list
  24.               of tasks to be performed, or old tasks disabled.
  25.  
  26.      SYNTAX:  CLKTIMER /[a,b,c,d,i,r,w,x][u,a,d] [nn[:nn]] [string]
  27.  
  28.               The slash is interpreted as the start of another delimited
  29.               argument on the command line; therefore every argument must
  30.               begin with a slash.  The square brackets in the syntax line
  31.               above denote optional parameters, and should not be used as a
  32.               part of the arguments.  Recognized arguments are listed
  33.               below.  Any unrecognized argument will cause the program to
  34.               display a help screen of information similar to this syntax
  35.               section.  Arguments can be concatenated upto the allowed
  36.               length of the command line (or a maximum of 256 characters).
  37.  
  38.               Recognized arguments which must follow immediately after the
  39.               slash are (case not significant):
  40.  
  41.                    a = set alarm time and message
  42.                        can set only one time for each of 24 hours per day;
  43.                        alarm will both chime and display the specified
  44.                        message; chime will end when the next key is pressed
  45.                        by the user; message displayed for one minute.
  46.  
  47.                    b = set boot time
  48.                        can set only one time for each of 24 hours per day;
  49.                        computer will boot at the beginning of the minute
  50.                        of the hour specified; it is not sensitive to
  51.                        whatever is happening (i.e. ignorant of any user).
  52.  
  53.                    c = set clock only display
  54.                        will disable date display if it was previously set;
  55.                        display is in reverse video in the upper right hand
  56.                        corner of the screen
  57.  
  58.                    d = set clock and date display
  59.                        will override clock only display if it was
  60.                        previously set; display is in reverse video in the
  61.                        upper right hand corner of the screen
  62.  
  63.                    h = toggle chime for sounding the hour; if set to sound
  64.                        chime at the beginning of each hour, the chime will
  65.                        be disabled; if the chime was disabled (default) it
  66.                        will be set to chime at the beginning of each hour
  67.  
  68.                    i = set idle time (seconds) and command
  69.                        idle time count is reset for each key pressed by the
  70.                        user; this task is aware of the user and will not
  71.                        interrupt or interfere with any DOS program
  72.  
  73.                    r = set repeat time (minutes after the hour) and command
  74.                        can set only one time for the task to be repeated
  75.                        each hour; this task is aware of the user and will
  76.                        not interrupt or interfere with any DOS program;
  77.                        task will be skipped if a DOS program is active at
  78.                        the beginning of the minute specified (DOS aware
  79.                        added for version 2.01s; not true for version 2.0s)
  80.  
  81.                    s = display the current task settings
  82.  
  83.                    w = set time to wait until executing a command
  84.                        can set only one time increment (hours and minutes)
  85.                        from the current time for the task to be executed;
  86.                        this task is aware of the used and will not interrupt
  87.                        or interfere with any DOS program; task will be
  88.                        skipped if a DOS program is active at the beginning
  89.                        of the minute computed
  90.  
  91.                    x = set execute time and command
  92.                        can set only one time for each of 24 hours per day;
  93.                        this task is aware of the user and will not
  94.                        interrupt or interfere with any DOS program; task
  95.                        will be skipped if a DOS program is active at the
  96.                        beginning of the minute of the hour specified
  97.  
  98.               Secondary flags which must follow immediately after the
  99.               argument character are:
  100.  
  101.                    a = mark this task to be done only if a DOS program is
  102.                        not running at the specified time
  103.  
  104.                    u = mark this task to be done at the specified time, even
  105.                        if a DOS program is running
  106.  
  107.                    d = delete the task previously set for the time specified
  108.  
  109.              For example:
  110.  
  111.                CLKTIMER /a 12:00 'LUNCH TIME'     set an alarm for 12:00
  112.                                                   (noon) to display the
  113.                                                   message LUNCH TIME
  114.  
  115.                CLKTIMER /ad 12:00                 disable the alarm
  116.                                                   previously set for 12:00,
  117.                                                   but keep the same display
  118.                                                   string
  119.  
  120.               Specifying the time is done in a 24 hour format for alarm
  121.               times, boot times and time to execute a task, and uses two
  122.               number separated by a colon ( : ); a zero will be assumed if
  123.               the number of minutes is not specified.  For the repeat time
  124.               (minutes after the hour) and the idle time (number of
  125.               seconds) only a single number is used.  Hours must be in the
  126.               range [0..23], minutes and seconds must be in the range
  127.               [0..59].  A blank in the time specification will be assumed
  128.               to be a zero.
  129.  
  130.               The command string or alarm display string are after the time
  131.               specification for the argument.  The string is generally a
  132.               combination of text delimited by quote marks ( ' ) and
  133.               representations of special keystrokes.  Special keystrokes
  134.               include any decimal ASCII representation of a keystroke (for
  135.               example the carriage return or enter key is 013), or a scan
  136.               code which begins with the at sign ( @ ).  Scan codes are not
  137.               tested for accuracy, only inserted into the keystroke buffer.
  138.               Therefore, extended keyboard scan codes can be used if your
  139.               computer recognized an extended keyboard.  Since the keyboard
  140.               buffer is manipulated directly, there can be a maximum of 16
  141.               keystrokes specified.
  142.  
  143.               The first time the program is run, the task settings
  144.               specified are loaded with the TSR version of the program.  If
  145.               the program is already loaded, then the arguments will modify
  146.               the task settings of the TSR version of the program (i.e.
  147.               will change the memory resident data storage).
  148.  
  149.      DEFAULTS:
  150.               a     time defaults to 00:00
  151.                     display defaults to a null string or previous setting
  152.                     task is DOS unaware
  153.                     there are no alarms set initially
  154.  
  155.               b     boot time defaults to 00:00
  156.                     task is DOS unaware
  157.                     there are not boot times set initially
  158.  
  159.               c     clock display defaults to off
  160.                     task is DOS unaware
  161.  
  162.               d     date and clock display defaults to off
  163.                     task is DOS unaware
  164.  
  165.               h     hour chime defaults to off (not sounded)
  166.                     task is DOS unaware
  167.  
  168.               i     time defaults to 300 seconds
  169.                     command defaults to 'C:\IDLE' 013 or previous setting
  170.                     task is DOS aware
  171.                     the idler timer defaults to off
  172.  
  173.               r     time defaults to 00 minutes after each hour
  174.                     command defaults to 'C:\REPEAT' 013 or previous setting
  175.                     task is DOS aware
  176.                     there is no repeat time set initially
  177.  
  178.               w     time defaults to 00:00 increment from the current time
  179.                     command defaults to 'C:\WAIT' 013 or previous setting
  180.                     task is DOS aware
  181.                     there is not wait time set initially
  182.  
  183.               x     time defaults to 00:00
  184.                     command defaults to 'C:\EXECUTE' 013 or previous setting
  185.                     task is DOS aware
  186.                     there are no execute times set initially
  187.  
  188.      EXAMPLES:
  189.               CLKTIMER /a 16:45 'Clean up time'
  190.                    set an alarm task for 4:45 pm to display  Clean up time
  191.  
  192.               CLKTIMER /b2:59
  193.                    set a task to boot the computer at 2:59 am
  194.  
  195.               CLKTIMER /c /h
  196.                    set two tasks, one to display the clock in the upper
  197.                    right hand corner of the display (this will disable the
  198.                    date display if previously set) and one to toggle the
  199.                    hour chime (will be turned on if this is the first time
  200.                    CLKTIMER is run)
  201.  
  202.               CLKTIMER /D
  203.                    set a task to display the date and time in the upper
  204.                    right hand corner of the display
  205.  
  206.               CLKTIMER /h
  207.                    toggle the hour chime (turn it on if previously off, or
  208.                    turn it off if previously on)
  209.  
  210.               CLKTIMER /I 60
  211.                    set a task to monitor the idle status of the computer
  212.                    and to start the program C:\IDLE after the computer has
  213.                    been idle for 60 seconds
  214.  
  215.               CLKTIMER /i60 'C:\bat\idle.bat' 013
  216.                    set a task to monitor the idle status of the computer
  217.                    and to start the batch program C:\BAT\IDLE.BAT after the
  218.                    computer has been idle for 60 seconds
  219.  
  220.               CLKTIMER /ru55
  221.                    set a task to start the program C:\REPEAT at 55 minutes
  222.                    after every hour (24 hours per day); task will be DOS
  223.                    unaware (will be done even if a DOS program is running)
  224.  
  225.               CLKTIMER /S
  226.                    display the current status and list of tasks set for the
  227.                    copy of CLKTIMER which is resident in memory (TSR)
  228.  
  229.               CLKTIMER /w1:00 'wait_1hr' 13
  230.                    set a task that at 1 hr and 00 minutes from the current
  231.                    time will start the program WAIT_1HR (the DOS PATH will
  232.                    be searched for the program)
  233.  
  234.               CLKTIMER /x9:20 'at9_20' 13
  235.                    set a task that at 9:20 am will start the program AT9_20
  236.                    (the DOS PATH will be searched for the program)
  237.  
  238.               CLKTIMER /da /h /i120 /a12:00'LUNCH TIME' /B2
  239.                    set a task to display date and time (date and time task
  240.                    is DOS aware, and so will not display if a DOS program
  241.                    is running), toggle the hour chime, set a task to monitor
  242.                    the idle status and start the program C:\IDLE after 120
  243.                    seconds of being idle, set an alarm task to display
  244.                    LUNCH TIME  at 12:00 (noon) and set a task to boot the
  245.                    computer at 2:00 am
  246.  
  247.      CAUTIONS: DOS BIOS calls have been used as much as possible
  248.               to help maintain compatibility with different operating
  249.               system implementations.  The major exception is the direct
  250.               manipulation of the keyboard buffer.
  251.  
  252.               Time information is take directly from the BIOS data area,
  253.               and so program may not work correctly if your BIOS does not
  254.               follow PC-DOS convention for location of this information.
  255.  
  256.               Date information is obtained from DOS when the program is
  257.               first run, and then updated internally.  It should be aware
  258.               of leap years, and varying number of days per month.  Changing
  259.               the date from the command line will not change the date
  260.               displayed by CLKTIMER
  261.  
  262.               The information written to the screen is updated
  263.               approximately once each second.  If it scrolls off the top of
  264.               the screen, wait one second and it should reappear.
  265.  
  266.               Software interrupt 66h is used to communicate between the
  267.               currently running version of the program and the TSR version
  268.               in memory.  This is an arbitrary choice, and can be changed
  269.               in your registered version if you tell me which software
  270.               interrupt you desire to use.
  271.  
  272.               CLKTIMER looks for itself only in low memory.  Therefore, it
  273.               is recommended that the program not be loaded high using
  274.               DOS 5.0 or similar utilities.
  275.  
  276.               The time, date and alarm information will only be displayed
  277.               for 40 or 80 column text modes (int 10h, modes 0-3 and 7).
  278.               In other screen modes, all other functions (including chimes)
  279.               still work.
  280.  
  281.               Windows 3.0: the boot feature and the chimes will work when
  282.               Windows is running; there will be no screen display unless
  283.               you have a DOS window running; the function of the keystroke
  284.               buffer under Windows has not been investigated.
  285.  
  286.      UPGRADES: Version 2.01 fixed timer jump error which caused date to be
  287.               incremented after each minute of the first hour of the day;
  288.               changed time routine to get timer information directly from
  289.               BIOS data area instead of using 1Ah interrupt; moved repeat
  290.               code so that it is executed only if DOS is not active
  291.               (as specified in documentation).  31Aug92
  292.  
  293.               Version 2.02 fixed jump error caused by change to repeat code
  294.               in version 2.01;  execute command now performs correctly, when
  295.               previously the code was being skipped; also decreased size
  296.               of execute strings by 1 so their size matches specifications.
  297.               11Sep92
  298.  
  299.               Version 2.03 fixed jump error causing alarm information to not
  300.               be displayed when clock time or date information were not
  301.               displayed.  24Sep92
  302.  
  303.               Version 2.04 fixed problem with location of crt status byte
  304.               which was causing the computer to lock up if switched from
  305.               VGA to MDA mode.  23Oct92
  306.  
  307.               Version 2.1 added /w command to wait specified hours and
  308.               minutes from current time to stuff a command to keyboard.
  309.               05Oct92
  310.  
  311.               Version 3.0 added the secondary U and A flag to signify for
  312.               each task type whether they should be DOS unaware (U) or
  313.               aware (A).  The default awareness level of each task remains
  314.               are specified in version 2.xx.  Also added division routine
  315.               so that time displayed is correctly 18.2065 ticks per second.
  316.               Changed the format of the display and logic to show only task
  317.               events which are active.  Fixed problem with conflict between
  318.               wait task and boot tasks.  29Nov92
  319.  
  320.      DISCLAIMER: The program described above has been tested with MSDOS 3.3
  321.               and MSDOS 5.0, and when running under 4DOS and NDOS using
  322.               several hardware clones.  While it appears to perform
  323.               consistently as described, there is absolutely no guarantee
  324.               that it will do anything.  The author will not be responsible
  325.               for any loss or damages caused through the use of this
  326.               program.  No warranty, express or implied, is provided for
  327.               this software, it's performance, or it's usefulness for a
  328.               particular purpose.
  329.  
  330.               All trademarks mentioned are the property of their respective
  331.               owners.
  332.  
  333.               The program is Copyright 1992 by Roger Brook.
  334.  
  335.               You are encouraged to distribute this program under the
  336.               following conditions:
  337.  
  338.                  - all files contained in the archive or distribution disk
  339.                    must be distributed together in UNMODIFIED form
  340.  
  341.                  - you charge no more than a reasonable fee for copying or
  342.                    subscription, and clearly indicate that payment of such
  343.                    a fee does NOT grant ownership of the program
  344.  
  345.               You may evaluate this program for up to 30 days on a free
  346.               trial basis.  After 30 days, you should register your
  347.               continued use of this program.  The registration fee is $10
  348.               for use on a single computer (please specify disk size
  349.               desired), payable to the author at the address given below.
  350.               Site license requests in writing will be considered.
  351.  
  352.               Realistically, I don't expect to get rich from this effort.
  353.               Registration will get you a copy of the latest version of the
  354.               software, without the registration encouragement blurb.  I
  355.               will listen to and attempt to incorporate suggestions from
  356.               registered users.  If your suggestion is used, you will
  357.               receive a free copy of the updated program.
  358.  
  359.               Send comments and registration to:
  360.  
  361.                    Roger Brook
  362.                    523 Oakdale Drive
  363.                    Haslett MI 48840
  364.  
  365.               I do have a CompuServe and a Prodigy account, but I do not
  366.               monitor them on a regular basis.  If you want to send
  367.               your comments by electronic mail, sent them to either:
  368.  
  369.                    internet        BROOK@MAILBOX.AGE.MSU.EDU
  370.                    bitnet          BROOK@MSUEGR
  371.  
  372.  
  373. ------------------------------------------------------------------------
  374.  
  375.                 REGISTRATION REQUEST FORM
  376.  
  377.  
  378.      PROGRAM:                        # COPIES:            AMOUNT:
  379.  
  380.      CLKTIMER v3.0  ($10 per copy)   _________          $______________
  381.  
  382.           Diskette Type Required:  5-1/4" (360K) ___
  383.  
  384.                                    3-1/2" (720K) ___
  385.  
  386.      TOTAL. . . . . . . . . . . . . . . . . . . . . . . $______________
  387.  
  388.  
  389.      PAYMENT BY:
  390.  
  391.      Check/Money Order No.__________ enclosed for $____________________
  392.  
  393.  
  394.      SHIPPING ADDRESS:
  395.  
  396.      NAME                ______________________________________________
  397.  
  398.      ADDRESS LINE 1      ______________________________________________
  399.  
  400.      ADDRESS LINE 2      ______________________________________________
  401.  
  402.      CITY/STATE/PROVINCE ______________________________________________
  403.  
  404.      COUNTRY/POSTAL CODE ______________________________________________
  405.  
  406.      DAYTIME PHONE       ______________________________________________
  407.  
  408.      FAX PHONE           ______________________________________________
  409.  
  410.      SEND TO:       Roger Brook
  411.                     523 Oakdale Drive
  412.                     Haslett  MI  48840
  413.  
  414. ------------------------------------------------------------------------
  415.  
  416.  
  417.